import { createApp } from 'vue'
import App from '@/App.vue'

const app = createApp(App)

import router from '@/router/router.js'

app.use(router)

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'

app.use(ElementPlus, {
  locale: zhCn,
})

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

import { createPinia } from 'pinia'

const pinia = createPinia()
app.use(pinia)

app.mount('#app')
